module.exports = {
  devServer: {
    proxy: {
      '/dev-api': {  // 以/api开头的请求会被代理
        target: 'https://test.feeshine.com',  // 目标服务器地址
        changeOrigin: true,  // 改变请求源
        secure: false,
        pathRewrite: {
          '^/dev-api': ''  // 重写路径，去掉/api前缀
        }
      }
    }
  },
    module: {
      rules: [
        {
          test: /\.vue$/,
          loader: 'vue-loader',
        },
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env'],
            },
          },
        },
        {
          test: /\.css$/,
          use: ['style-loader', 'css-loader','sass-loader'],          
        },
      ],
    },
  };